package test19;

public class BufferedReader_ extends Reader_{
    private Reader_ reader_;

    public BufferedReader_(Reader_ reader_) {
        this.reader_ = reader_;
    }

    @Override
    public void read() {
        reader_.read();
    }

    //让方法更加灵活， 多次读取文件, 或者批量处理字符串数据
    public void readFiles(int num){
        for (int i = 0; i < num; i++) {
            reader_.read();
        }
    }
}
